package com.resys.entity.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Date;
import com.resys.entity.enums.DateTimePatternEnum;
import com.resys.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;


/**
 * 
 */
public class Comment implements Serializable {


	/**
	 * 评论唯一标识
	 */
	private String commentId;

	/**
	 * 内容
	 */
	private String content;

	/**
	 * 评论人
	 */
	private String commitId;

	/**
	 * 0:一级评论，1：二级评论
	 */
	private Integer type;

	/**
	 * 评价星数（0-5)
	 */
	private Integer likesCount;

	/**
	 * 回复对象，（二级评论才有）对应的评论id
	 */
	private String replyer;

	/**
	 * 
	 */
	private String replyerName;

	/**
	 * 发布时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createAt;

	/**
	 * 是否置顶
	 */
	private Integer isTop;

	/**
	 * 发布人名字
	 */
	private String commitName;

	/**
	 * 0:公司人员，1：用户
	 */
	private Integer commitRole;

	/**
	 * 一级评论使用时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date useAt;

	/**
	 * 一级评论关联的订单号
	 */
	private Integer orderId;

	/**
	 * 关联的会议室评价
	 */
	private Integer roomId;

	/**
	 * 所处于哪个目录
	 */
	private String commentpid;


	public void setCommentId(String commentId){
		this.commentId = commentId;
	}

	public String getCommentId(){
		return this.commentId;
	}

	public void setContent(String content){
		this.content = content;
	}

	public String getContent(){
		return this.content;
	}

	public void setCommitId(String commitId){
		this.commitId = commitId;
	}

	public String getCommitId(){
		return this.commitId;
	}

	public void setType(Integer type){
		this.type = type;
	}

	public Integer getType(){
		return this.type;
	}

	public void setLikesCount(Integer likesCount){
		this.likesCount = likesCount;
	}

	public Integer getLikesCount(){
		return this.likesCount;
	}

	public void setReplyer(String replyer){
		this.replyer = replyer;
	}

	public String getReplyer(){
		return this.replyer;
	}

	public void setReplyerName(String replyerName){
		this.replyerName = replyerName;
	}

	public String getReplyerName(){
		return this.replyerName;
	}

	public void setCreateAt(Date createAt){
		this.createAt = createAt;
	}

	public Date getCreateAt(){
		return this.createAt;
	}

	public void setIsTop(Integer isTop){
		this.isTop = isTop;
	}

	public Integer getIsTop(){
		return this.isTop;
	}

	public void setCommitName(String commitName){
		this.commitName = commitName;
	}

	public String getCommitName(){
		return this.commitName;
	}

	public void setCommitRole(Integer commitRole){
		this.commitRole = commitRole;
	}

	public Integer getCommitRole(){
		return this.commitRole;
	}

	public void setUseAt(Date useAt){
		this.useAt = useAt;
	}

	public Date getUseAt(){
		return this.useAt;
	}

	public void setOrderId(Integer orderId){
		this.orderId = orderId;
	}

	public Integer getOrderId(){
		return this.orderId;
	}

	public void setRoomId(Integer roomId){
		this.roomId = roomId;
	}

	public Integer getRoomId(){
		return this.roomId;
	}

	public void setCommentpid(String commentpid){
		this.commentpid = commentpid;
	}

	public String getCommentpid(){
		return this.commentpid;
	}

	@Override
	public String toString (){
		return "评论唯一标识:"+(commentId == null ? "空" : commentId)+"，内容:"+(content == null ? "空" : content)+"，评论人:"+(commitId == null ? "空" : commitId)+"，0:一级评论，1：二级评论:"+(type == null ? "空" : type)+"，评价星数（0-5):"+(likesCount == null ? "空" : likesCount)+"，回复对象，（二级评论才有）对应的评论id:"+(replyer == null ? "空" : replyer)+"，replyerName:"+(replyerName == null ? "空" : replyerName)+"，发布时间:"+(createAt == null ? "空" : DateUtil.format(createAt, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()))+"，是否置顶:"+(isTop == null ? "空" : isTop)+"，发布人名字:"+(commitName == null ? "空" : commitName)+"，0:公司人员，1：用户:"+(commitRole == null ? "空" : commitRole)+"，一级评论使用时间:"+(useAt == null ? "空" : DateUtil.format(useAt, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()))+"，一级评论关联的订单号:"+(orderId == null ? "空" : orderId)+"，关联的会议室评价:"+(roomId == null ? "空" : roomId)+"，所处于哪个目录:"+(commentpid == null ? "空" : commentpid);
	}
}
